package com.oceanread.cn.entity;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.util.JSONPObject;

public class User {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String username;
    private String password;
    private String role;

    public User(Integer id,String username,String password){
        this.id=id;
        this.username=username;
        this.password=password;
    }
    public User(String username,String password){
        this.username=username;
        this.password=password;
    }
    public User(String username){
        this.username=username;
        this.password=null;
    }
    public User(){
        super();
    }
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password==null?null:password.trim();
        /*trim() 方法用于删除字符串的头尾空白符。*/
    }
    public String getUsername() {
        return username;
    }
    public void setUsername(String username) {
        this.username = username;
    }
    public Integer getId() {
        return id;
    }
    public void setId(Integer id) {
        this.id = id;
    }
    public String getRole() {
        return role;
    }
    public void setRole(String role) {
        this.role = role;
    }
}
